package cn.tedu.tmall.basic.service.impl;

import cn.tedu.tmall.basic.dao.repository.ILockCacheRepository;
import cn.tedu.tmall.basic.service.ILockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LockServiceImpl implements ILockService {

    @Autowired
    private ILockCacheRepository lockCacheRepository;


    @Override
    public Boolean lock() {
        return lockCacheRepository.lock();
    }

    @Override
    public void unlock() {
        lockCacheRepository.unlock();
    }
}
